<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>js location地址栏</title>
</head>
<body>
	<div class="mian">
		<h1>aaaaaaaaaaaaaaa</h1>
		
	</div>

	<script>
		

		alert(location.protocol); //获取url中的访问协议
		
		//放到正式环境下，显示的结果为http:

	</script>
</body>
</html>